library(kaya)
kaya::read_sgf("[fallinstar]vs[tongyu123]1712466088030022613.sgf") %>%
  write_gif(file = "[fallinstar]vs[tongyu123].gif",stop = .[["n_moves"]],engient = "cli2",.keep = FALSE,number = TRUE)

library(dplyr)
library(kaya)
sgf <- list.files(pattern = "*.sgf")
gifname <- stringr::str_replace(sgf,"sgf","gif")
for (i in 1:length(sgf)){
  kaya::read_sgf(sgf[i]) %>%
    kaya::write_gif(file = gifname[i],stop = .[["n_moves"]],engient = "cli2",.keep = FALSE,
              number = TRUE)
}

